|
A program in ''Feature Oriented Software Development (FOSD)'' is a composition of functions (program transformations): a base program (modeled by a nullary function) is composed with increments in program functionality, called ''features'' (which are unary functions), to produce a complex program. A ''software product line (SPL)'' is a family of related programs. Suppose product line PL has F0 as a base program, and F1..Fn as features that could be added to F0. Different compositions of these functions/transformations yield different programs. For this discussion, let + denote function composition. A program P in PL might have the following expression: That is, P extends program F0 with features F1, F2, F4, and F8 in this order. We can recast P in terms of a projection and contraction of a 1-dimensional array. Let Fi = (.. Fn ) denote the array of transformations that define PL. A projection of Fi eliminates unneeded transformations, yielding a shorter array (call it) Gi. A contraction of Gi composes each transformation of Gi in a specific order, to yield a scalar expression. The expression for P becomes: where the index values accomplish projection and summation is array contraction. This idea generalizes to n-dimensional arrays that model multi-dimensional product lines. == Multi-Dimensional Product Lines == A ''multi-dimensional product line'' is described by multiple interacting sets of features. As an elementary 2D example, it is easy to create a product line of calculators, where variants offer different sets of operations. Another variation might offer different presentation front ends to calculators, one with no GUI, another with a Java GUI, a third with a web GUI. These variations interact: each GUI representation references a specific calculator operation, so each GUI feature cannot be designed independently of its calculator feature. Such a design leads to a matrix: columns represent increments in calculator functionality, and rows represent different presentation front-ends. Such a matrix M is shown to the right: columns allow one to pair basic calculator functionality (base) with optional logarithmic/exponentiation (lx) and trigonometric (tg) features. Rows allow one to pair core functionality with no front-end (core), with optional GUI (gui) and web-based (web) front-ends. An element Mij implements the interaction of column feature i and row feature j. For example, the element labeled cb is a base program that implements the core functionality of a calculator. Element gb adds code that displays the core functionality as a GUI; element wb adds code that displays the core functionality via the web. Similarly, element ct adds trigonometric code to the core calculator functionality; elements gt and wt add code to display the trigonometric functionality as a GUI and web front-ends. A calculator is uniquely specified by two sequences of features: one sequence defining the calculator functionality, the other the front-end. For example, calculator C that offers both base and trig functionality in a web format is defined by the expression: : Note: Each dimension is a collection of base programs and features. Not all of their compositions are meaningful. A feature model defines the legal combinations of features. Thus, each dimension would have its own feature model. It is possible that selected features along one dimension may preclude or require features along other dimensions. In any case, these feature models define the legal combinations of features in a multi-dimensional product line. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「FOSD Program Cubes」の詳細全文を読む スポンサード リンク
|